package cn.le.netty.beans;

public enum EnumMsgCode {
    login(1,"用户登录"),exit(2,"用户退出"),send(3,"发送消息"),
    heartbeat(4,"心跳");

    private int code;
    private String text;

    EnumMsgCode(int code, String text){
        this.code = code;
        this.text = text;
    }

    public boolean valueOf(int code){
        return this.code == code ? true : false;
    }

    public int getCode() {
        return code;
    }
}
